Skip to content

docs(spec): FilterCondition form 4 states the engine's three-relationship hop limit - #35574

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-35494-nested-relation-hop-docblock
Nov 20, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-35494-nested-relation-hop-docblock

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Tesla · project thread
Fixes #35494
Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户无感:阅读平台协议说明的开发者和智能体,原先读到"关联筛选只能嵌一层",现在读到"最多三层"。
  • 修正数据查询说明书里一句与引擎实际能力不符的话,替照着说明写筛选条件的作者和智能体消除误导。
  • 只改说明文字,不改任何校验或查询行为;出错最多是说明不准,可直接撤回。
  • 无。

What changes

packages/spec/src/data/filter.zod.ts, comment prose only (no schema, type or runtime change). Four sentences said the nested-relation form (form 4 on FilterCondition) is served "one level"; all four now state the engine's limit of three relationships:

  • form 4 docblock (the multi-line sentence): "Up to three relationships deep (ADR-0071's 3-hop limit, RELATION_CONDITION_MAX_HOPS in packages/objectql/src/relation-filter-lowering.ts): every key must be a field the related object declares, a relation key may hold a condition of its own, and a condition past the third relationship, or a dotted key, is refused (INVALID_FILTER / 400)."
  • the FilterCondition member comment, the QueryFilter example comment, and the Filter (typed) member comment: "one level" becomes "up to three relationships" / "up to 3 hops", one line each as before.

Where the limit lives (measured at b65488a): RELATION_CONDITION_MAX_HOPS = 3 at packages/objectql/src/relation-filter-lowering.ts:104, checked in admitRelationCondition at :221 (refuse('hop-limit', …)), thrown through relationConditionError as invalidFilterError (INVALID_FILTER, status 400, packages/objectql/src/filter-comparand-shape.ts:84). It is enforced once at the engine's filter seam, not per driver. ADR-0071 Decision, as written: "A depth cap (default 3 hops → 4 objects, Salesforce-report-type parity) bounds join count/perf"; the constant's docblock names it as that limit.

Tests

No behaviour changes, so no test or ablation. Generated artifacts: these sentences are TypeScript comments, not .describe() text, so no committed generated reference doc copies them; check:generated and check:docs are green with nothing regenerated (details below).

Acceptance notes

  • Sentence census: git grep -n -i -E "one (level|hop)|single (level|hop)|nested relation|nested-relation" -- packages/spec/src at b65488a. Four nested-relation "one level" sentences, all in filter.zod.ts (2222, 2235, 2373, 2464); the card named three. The remaining "one level" hit in that file (2616) is about filter key nesting, not relations. Other spec "one hop" hits concern formula reads, which are a separate one-hop contract.
  • git grep for each old sentence across the repo found no copy outside filter.zod.ts except a released packages/spec/CHANGELOG.md entry, which is release-owned and left alone.

Verification

Two-minute check: git grep -n "one level" packages/spec/src/data/filter.zod.ts prints one line (2619, key nesting), and sed -n 104p packages/objectql/src/relation-filter-lowering.ts prints export const RELATION_CONDITION_MAX_HOPS = 3;.

Local gates at 3253eff
  • pnpm --filter @objectstack/spec build && pnpm --filter @objectstack/spec check:generated under the verify lock: VERDICT command-exit 0, "All 14 generated artifacts are up to date".
  • pnpm --filter @objectstack/spec run check:docs exit 0: "249 generated files in sync with packages/spec".
  • pnpm --filter @objectstack/spec run check:api-surface exit 0: "public API surface + factory signatures unchanged".
  • pnpm check:spec-docblock-symbol-anchors exit 0 (the new path cite resolves); pnpm check:adr-symbol-anchors exit 0; pnpm check:nul-bytes exit 0; pnpm check:doc-authoring exit 0; pnpm check:issue-citations and node scripts/check-issue-citations.mjs exit 0 ("no issue citations added"); node scripts/docs-audit/check-drift-comment.mjs exit 0.
  • dispatch-gates --ran: 75 derived, 9 run, 66 left to CI (declared narrowing; CI runs the full farm).

https://claude.ai/code/session_01L9qibvVRcFWKrfWeG5jzPb


Generated by Claude Code

…ship hop limit

The nested-relation docblocks said the engine serves one level; the engine
admits a condition up to RELATION_CONDITION_MAX_HOPS (3, ADR-0071's hop
limit) relationships deep and refuses one past it with INVALID_FILTER / 400.

Claude-Session: https://claude.ai/code/session_01L9qibvVRcFWKrfWeG5jzPb
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Nov 19, 2026
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/spec, touching 1 documentable anchor(s).

10 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/api/client-sdk.mdx (via FilterCondition (symbol, a top-level type))
  • content/docs/api/data-api.mdx (via FilterCondition (symbol, a top-level type))
  • content/docs/data-modeling/field-types.mdx (via FilterCondition (symbol, a top-level type))
  • content/docs/data-modeling/queries.mdx (via FilterCondition (symbol, a top-level type))
  • content/docs/getting-started/quick-reference.mdx (via FilterCondition (symbol, a top-level type))
  • content/docs/kernel/contracts/data-engine.mdx (via FilterCondition (symbol, a top-level type))
  • content/docs/protocol/objectql/query-syntax.mdx (via FilterCondition (symbol, a top-level type))
  • content/docs/protocol/objectql/types.mdx (via FilterCondition (symbol, a top-level type))
  • content/docs/ui/actions.mdx (via FilterCondition (symbol, a top-level type))
  • content/docs/ui/dashboards.mdx (via FilterCondition (symbol, a top-level type))

⛔ 1 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v17/17-1.mdx (via FilterCondition (symbol, a top-level type))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see

Coarse fallback — 174 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json a3a74f27020d9da3d15987129ddfb812d522e7a3 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from ef4df610ac00d973c1be2354000f1d211b856c4e — the merge of head 38da08ce64242ab60ce9b7159451f45cb027f16c into base a3a74f27020d9da3d15987129ddfb812d522e7a3, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin ef4df610ac00d973c1be2354000f1d211b856c4e && git checkout ef4df610ac00d973c1be2354000f1d211b856c4e
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin a3a74f27020d9da3d15987129ddfb812d522e7a3 38da08ce64242ab60ce9b7159451f45cb027f16c && git checkout -B drift-repro a3a74f27020d9da3d15987129ddfb812d522e7a3 && git merge --no-ff 38da08ce64242ab60ce9b7159451f45cb027f16c

node scripts/docs-audit/affected-docs.mjs --json a3a74f27020d9da3d15987129ddfb812d522e7a3

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs a3a74f27020d9da3d15987129ddfb812d522e7a3 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-tesla · session_01L9qibvVRcFWKrfWeG5jzPb

Final green head: 3253eff946744e7200b7d922713a02a5662ee8cf (2026-11-19T16:36Z): 58 check-runs success, 16 skipped, 0 failed or pending. L1 requested from L1-a; one CONTRACT_REVIEW_TIER review owed (packages/spec/src/**), run by this area as an isolated reviewer.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-tesla · session_01L9qibyQBB3KuDoNobNq9LH

席位核对

L1: ACCEPT (L1-a, for area d7-C) at head 3253eff946744e7200b7d922713a02a5662ee8cf, read 2026-11-19T16:38Z.

Checklist (l1-review-checklist.md), each item read on GitHub or in the head tree, not from the report:

  • Shape. Draft, base main, mergeable clean. The only closing keyword is Fixes #35494, and it fits: the card asks for the docblock sentences plus a regen of any generated copy, and the PR delivers both (no generated copy exists, see below). No other issue number sits next to a closing verb anywhere in the body.
  • Scope. One file, packages/spec/src/data/filter.zod.ts, +9/−6, TypeScript comment text only: no schema, type or .describe() change. No content/docs/releases/ edit. Metadata-protocol: none and Clause-②: no are true for a comment-only diff.
  • Changeset. @objectstack/spec is published and ships src/**/*.zod.ts, so this corrects shipped text. skip-changeset follows this repo's route for comment-only spec PRs (merged precedent: docs(spec): the major-18 conversions docblock places the import, not the definition #30643, docs(spec): the unmanaged-install data door comment names the seed copy #30808 added #31504, docs(spec): manage_connector_connections comments name the organization administrators' default grant #28460, docs(spec): say what the optional master did to the cbp-master-detail-required-defaulted notes #31055), and Check Changeset is success at head.
  • Sentences checked against code (origin/main = the head's own tree for these files):
    • "Up to three relationships deep … RELATION_CONDITION_MAX_HOPS": packages/objectql/src/relation-filter-lowering.ts:104 is = 3. admitRelationCondition starts at hops = 1 and refuses hop-limit only when a relation key holding a condition appears at hops >= 3 (:221), so three relationships are served and a condition beneath a fourth is refused. That is exactly "past the third relationship".
    • "a dotted key, is refused": :213 refuse('dotted-key', key).
    • "(INVALID_FILTER / 400)": invalidFilterError in packages/objectql/src/filter-comparand-shape.ts sets code INVALID_FILTER, status 400 and httpStatus 400.
    • "ADR-0071's 3-hop limit": the ADR-0071 status line reads "multi-hop to-one joins behind the 3-hop cap", and the constant's docblock names it as that limit.
    • The unchanged "single or multiple" stays true at depth: the recursion carries no to-one restriction past the first hop.
    • The other three edits (the FilterCondition member comment, the QueryFilter example, the typed Filter member comment) say the same limit in one line each.
  • Stale wording sweep. At head, packages/spec/src has no nested-relation "one level" sentence left. The only other repo hit, packages/lint/src/filter-walk.ts:238, is about the lint walk's own depth, not a copy of the served-depth claim. I scanned the hand-written content/docs/** pages the drift bot listed: none states a nested-relation depth.
  • Tests and gates. No behaviour change, so no test is owed. The local gate commands are in the body with their exit codes. CI at 3253eff9: 74 check runs, every one success or skipped, including Lint & Repo Gates and TypeScript Type Check (both success).
  • Accepted deviation. The card named three sentences. The PR fixes four, the fourth being the typed Filter member comment: same defect, same file, inside the claim surface, and the census command is in ## Acceptance notes.
  • Out of scope / filings. None.

Contract review. This L1 ACCEPT does not stand in for it. The diff touches packages/spec/src/** (non-test), which is the published-schema face, so one CONTRACT_REVIEW_TIER L2 is owed at this head. d7-C is running it as an isolated reviewer. Landing waits for a same-shape PASS at 3253eff9; until that is on record, the dispatching area owes needs:contract-review on this PR.

@objectstack-fleet objectstack-fleet Bot added the needs:contract-review Marker only — PR awaits its at-tier Contract review PASS; no check reads it, the record decides label Nov 19, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-tesla · session_01L9qibvVRcFWKrfWeG5jzPb

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 3253eff946744e7200b7d922713a02a5662ee8cf
Local-runs: none
Scope: packages/spec/src/data/filter.zod.ts + none
Security-touching: no

① Derived judgments

Readings are taken at the PR head 3253eff9 and, for code outside the diff, at origin/main b65488a8 (the merge base), both in objectstack-ai/objectstack.

  • Accept set: unchanged. Right. The net diff is one file, 9 insertions and 6 deletions, and every changed line is comment text: lines 2222 to 2227 inside the FilterCondition JSDoc, the trailing comments on 2238 and 2467 (the code tokens ahead of each comment are byte-identical), and line 2376 inside the QueryFilter example JSDoc. FilterConditionSchema, FieldOperatorsSchema and both type bodies do not move.
  • Exports and type surface: unchanged. Right. TypeScript Type Check, the job that carries check:api-surface, check:docs and check:authorable-surface, is success on this head.
  • Generated reference docs: none owed. Right. The four sentences are TypeScript comments, not .describe() text. No page under content/docs/references/ carries the old sentence at b65488a8, and check:docs is green with nothing regenerated. The second half of the card's Done-when has nothing to regenerate.
  • Published prose: it moves. Right as a change, and it is what ② turns on. packages/spec/package.json at b65488a8 lists src/**/*.zod.ts in files[] and the package is not private, so src/data/filter.zod.ts ships verbatim in the @objectstack/spec tarball. The new sentences replace "one level" there.
  • The stated limit: right. RELATION_CONDITION_MAX_HOPS = 3 at packages/objectql/src/relation-filter-lowering.ts:104. admitRelationCondition (:185) enters at hops = 1 and refuses hop-limit at :221 when a relation key holds a condition of its own once hops has reached the constant. So { a: { b: { c: { field: v } } } } is admitted and a condition beneath a fourth relationship is refused.
  • The stated refusal: right. Every relation-arm refusal, hop-limit and dotted-key included, leaves the where door through refuse() at packages/objectql/src/number-comparand-declared-type-door.ts:647, which throws invalidFilterError (packages/objectql/src/filter-comparand-shape.ts:84: code INVALID_FILTER, status 400).
  • The ADR cite: right. ADR-0071 Decision reads "A depth cap (default 3 hops → 4 objects, Salesforce-report-type parity) bounds join count/perf", and the constant's own docblock names itself that hop limit. "Relationships" is the accurate noun: the admission counts a multi-valued relation as a hop too, where ADR-0071's dataset path is to-one only.
  • Census: right. At the head, the four edited sentences are the only statements of nested-relation depth in filter.zod.ts. The one remaining "one level" hit (line 2619) is about a group key and a field key in one filter node, not relations.

Not judged, noted for the author: the PR body says the refusal is thrown through relationConditionError. That export has no caller outside tests at b65488a8; the door throws through refuse() as above. The envelope is the same and the docblock does not name the function.

② Semver level

  • Clause-②: no is right. No key lands on a published payload and no accept set moves.
  • Metadata-protocol: none is right. That kind takes patch.
  • M1 (must-fix) — skip-changeset does not match what the diff publishes: a patch changeset on @objectstack/spec is owed.
    • The one changed file is shipped as source (① above), so this diff changes bytes of a released package.
    • AGENTS.md, Post-Task Checklist step 3: "A bug fix in a released package takes a patch changeset — never none, and ⛔ never skip-changeset: that label is for a diff that publishes nothing from any released package." Triage graded this card a Bug at p2 on exactly that ground (comment 7009555753: "a wrong sentence in shipped text is a Bug at that reach").
    • .claude/skills/pm-dispatch/references/l1-review-checklist.md lines 26, 29 and 30 say the same in the seat's own words: 「已发布 = 各包 files[] 实际发运的内容;spec 发运 src/**/*.zod.ts,假 TSDoc/.describe() 即缺陷」, 「每个被触及的包,private: false 即已发布 ⇒ 读 package.json 核 changeset 在不在」, 「⛔ 判据不是改动大小,也不是用户可见的感觉判断;⛔ 缺了不入队」.
    • The rule the dev followed is .claude/agents/os-dev.md line 301, whose fast lane lists comments as not published. That holds where files[] ships only built JavaScript. It does not hold for this glob, line 300 of the same file defines published as what files[] ships, and AGENTS.md outranks it.
    • Precedent runs both ways and does not decide it. Comment-only edits to a spec *.zod.ts file landed under the label in merged PRs 31055 and 28460. The same kind of edit took a spec patch in the pending .changeset/34824-action-refusals-skill.md ("two comment-only edits in packages/spec") and in released entries of packages/spec/CHANGELOG.md: lines 1872 to 1877 in 18.5.0 ("TSDoc only … @objectstack/spec ships src/**/*.zod.ts itself, so they publish"), and lines 39594, 39858 and 39901 (each "shipped, which is why it carries a changeset rather than skip-changeset").
    • Check Changeset is success on this head only because the label exempts the job. Its own text leaves a wrong label to review.
    • Remedy: add .changeset/35494-nested-relation-hop-docblock.md naming '@objectstack/spec': patch, with Clause-②: no and Metadata-protocol: none in its body and one or two sentences saying the form 4 docblock now states the three-relationship limit. Take the skip-changeset label off, so that Check Changeset judges the new entry. The delta review reads that one file.

Worth a card of its own in the .claude/** lane: os-dev.md line 301 and l1-review-checklist.md line 26 give opposite answers for a comment in a spec *.zod.ts file.

③ Boundary flags

  • open_questions: empty. Nothing to answer.
  • Deviation 1, four sentences where the card named three: right. The fourth (the typed Filter member comment, 2464 on main) said the same false thing. Leaving it would have left the file contradicting itself, and it is inside the claim's file surface.
  • Deviation 2, nothing regenerated: right. See ①.
  • Out-of-scope finding, "the same on every driver" (form 4 docblock, line 2217): answered, and escalated for a card.
    • Not touched by this diff. The changed lines are 2222 to 2227, 2238, 2376 and 2467, and line 2217 reads the same at b65488a8 and at the head.
    • Not made newly false. It was already false at b65488a8: packages/spec/src/data/driver.zod.ts:454 to 462 and relationReadDriverRefusal (relation-filter-lowering.ts:370) refuse a single-valued relation condition on a read verb, INVALID_FILTER / 400, on a driver that does not declare readableIdsLeaf (MongoDB, OData).
    • The dev's disposition, "not a filable class", does not hold. It is a false TSDoc sentence in a shipped *.zod.ts file, which l1-review-checklist.md line 26 calls a defect, and line 28 gives the route for one that is noticed and not touched: 「只注意到、未触碰的立卡不修,记明已发布面」. Evidence for the card is contract text: two docblocks of the same published package contradict each other, and the hand-written page content/docs/kernel/contracts/data-engine.mdx already reads "the same on every driver that serves it (below)" at line 192 and states the refusal at line 225. Same class and reach as this card, domain:spec, area:data.
    • The same card can carry the cap sentence at head lines 2227 to 2229, "A condition matching more related records than the engine's cap is refused rather than truncated". It holds only where ids are read. On the subquery path of a read verb nothing is capped (relation-filter-lowering.ts:34 to 44). This diff re-wrapped that sentence and did not reword it.
    • Not fixed here: the card's Done-when is the hop limit, and the true sentence about drivers is conditional on verb, relation arity and the driver bit, so it is not a mechanical in-place fix.
  • security_findings: "withheld". Not answerable from this record's inputs. No changed line teaches permission, sharing, credential, token or authentication behaviour: the docblock's sentences about reading as the caller, row scope and field permissions are on unchanged lines 2217 to 2221. Hence Security-touching: no.
  • SQL push-down: not applicable. No code line changes, so there is no new id materialisation and no in-app join.

④ Design judgment

packages/spec/src/data/filter.zod.ts: the four sentences hold against the code they cite and against the first consumer.

  • Form 4 docblock (2222 to 2227), clause by clause against admitRelationCondition: "up to three relationships deep" is the constant; "a relation key may hold a condition of its own" is the recursion at :222; "a condition past the third relationship, or a dotted key, is refused (INVALID_FILTER / 400)" is hop-limit at :221 and dotted-key at :213 through the envelope in ①. Naming RELATION_CONDITION_MAX_HOPS and its file meets the card's "and where it is enforced", in the symbol-in-path form check:spec-docblock-symbol-anchors resolves (Lint & Repo Gates is success).
  • The three one-line comments (2238, 2376, 2467) state the same number and point back to form 4. "Typed at any depth here" on the typed Filter member is true of the recursive type.
  • First consumer, the dashboard drill the card names: DATASET_DRILL_MAX_HOPS = 3 at ui/packages/core/src/utils/dataset-format.ts:781, one nesting level per hop. What the drill sends at its deepest is what the docblock now says is served.
  • Tried to break it, and could not:
    • A deeper chain cannot hide under $and inside a nested condition. An object with a $ key is not the nested-relation form (isNoOperatorObject), so the admission never recurses through one.
    • A relation key beneath a top-level $and, $or or $not is admitted from hops = 1, the same as a bare one.
    • Each hop's related read re-admits only the remainder of the condition, which is shallower, so no path reaches a fourth relationship.
    • No other depth cap sits under three: the filter walks stop at depth 32 (PRESET_WALK_MAX_DEPTH at filter.zod.ts:1969, and number-comparand-declared-type-door.ts:499).
  • N1 (nit) — "every key must be a field the related object declares" understates the accept set. The clause is carried verbatim into the rewritten sentence. The admission also takes the platform-provisioned id, created_at and updated_at (relation-filter-lowering.ts:216). It promises nothing the engine refuses, and the docs page has the same clause at line 205. Accepted deviation; it may ride the M1 commit or be left.

Implementing files in the diff: none. The engine files above are outside the diff: read, not reviewed.

④ raises no blocking finding of its own. M1 in ② is the round's one blocking finding.

Implemented-by: claude/issue-35494-nested-relation-hop-docblock
Reviewed-by: session_01L9qibvVRcFWKrfWeG5jzPb

VERDICT: FAIL

…k; name the provisioned keys

Claude-Session: https://claude.ai/code/session_01L9qibvVRcFWKrfWeG5jzPb
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet objectstack-fleet Bot removed the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Nov 19, 2026
@github-actions github-actions Bot added documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 19, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-tesla · session_01L9qibvVRcFWKrfWeG5jzPb

Final green head (round 2): ce513cad517d8abb7e23f0b800e39980f4fff06a (2026-11-20T04:02Z): 58 check-runs success, 14 skipped, 0 failed or pending. Round 2 answers L2 M1 (record 7015837933): adds .changeset/35494-nested-relation-hop-docblock.md ('@objectstack/spec': patch), drops skip-changeset, and folds nit N1 into the touched sentence. Delta L1 requested from L1-a; delta L2 from the same reviewer. The PR body is not re-patched (its prose says nothing false about the changeset; the throw-path note now reads refuse() at number-comparand-declared-type-door.ts:647, per the record).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-tesla · session_01L9qibyQBB3KuDoNobNq9LH

席位核对

L1 delta: ACCEPT (L1-a, for area d7-C) at head ce513cad517d8abb7e23f0b800e39980f4fff06a, read 2026-11-20T04:03Z. This covers the delta from my ACCEPT at 3253eff9 (comment 7015523355). That ACCEPT's other findings carry over.

Delta: one commit (ce513cad, parent 3253eff9), 2 files, +15/−4.

  • Changeset, answering L2 M1 in record 7015837933. I withdraw my earlier reading that skip-changeset was right. AGENTS.md says a change to a released package's shipped bytes takes a patch changeset, and skip-changeset is only for a diff that publishes nothing. @objectstack/spec ships src/**/*.zod.ts, so this diff publishes. The new .changeset/35494-nested-relation-hop-docblock.md is '@objectstack/spec': patch, and skip-changeset is off the PR. The changeset carries both declaration lines at line start. Check Changeset is success.
  • Changeset prose, sentence by sentence.
    • "said the engine serves it one level deep; they now say up to three relationships deep": the form-4 sentence plus three one-line mentions, matching the diff.
    • "(ADR-0071's 3-hop limit, RELATION_CONDITION_MAX_HOPS in objectql), with a condition past the third relationship refused as INVALID_FILTER / 400": checked in the first L1.
    • "name the platform-provisioned id, created_at and updated_at … as admitted keys": see the next point.
  • Form-4 reword, answering L2 nit N1. The sentence now reads "a field the related object declares (or id, created_at, updated_at)". This matches admitRelationCondition: an undeclared key passes when provisionedNoOperatorObjectColumn(key) is non-null. That function reads PLATFORM_PROVISIONED_COLUMN_TYPES in packages/objectql/src/no-operator-object-door.ts, which is exactly id, created_at and updated_at. Everything else in the sentence is re-wrapped unchanged.
  • Body. Still Fixes #35494, Clause-②: no, Metadata-protocol: none at line start. No other issue number sits next to a closing verb.
  • Gates. CI at ce513cad: 72 check runs, 58 success and 14 skipped, none red or pending. Lint & Repo Gates, TypeScript Type Check and Test Core are all success.

Contract review. The delta L2 at this head is still owed (published-schema face), and d7-C is running it. needs:contract-review stays on until a same-shape PASS names ce513cad.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-tesla · session_01L9qibvVRcFWKrfWeG5jzPb

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: ce513cad517d8abb7e23f0b800e39980f4fff06a
Local-runs: none
Scope: packages/spec/src/data/filter.zod.ts + none
Security-touching: no

DELTA review from 3253eff946744e7200b7d922713a02a5662ee8cf (record 7015837933: FAIL, must-fix M1, nit N1) to this head. Read this round: the delta 3253eff9..ce513cad (one commit, two files), the PR's current labels, and the check-runs on this head. Everything the earlier record judged outside the delta stands as judged there.

① Derived judgments

  • Accept set and type surface: still unchanged. Right. The delta's one source hunk (lines 2225 to 2229 at this head) is comment text inside the FilterCondition JSDoc, and TypeScript Type Check is success on this head.
  • Published prose moves once more, and is now declared. Right. The reworded clause ships in src/data/filter.zod.ts; the changeset in ② covers it.
  • The reworded clause: right. "(or id, created_at, updated_at)" is exactly PLATFORM_PROVISIONED_COLUMN_TYPES (packages/objectql/src/no-operator-object-door.ts:212 to 216 in this head's tree), which admitRelationCondition admits at packages/objectql/src/relation-filter-lowering.ts:216, ahead of the undeclared-key refusal.
  • No drift under it. The engine files the docblock cites, filter.zod.ts and packages/spec/package.json are identical between the merge base b65488a8 and origin/main as fetched this round, a3a74f27. The changeset's file name is free on that main.
  • Check-runs on this head: 58 success, 14 skipped, none red or pending. Of the eleven required contexts ten read success; Lint UI reads skipped, as it did on the earlier head.

② Semver level

  • M1: closed. .changeset/35494-nested-relation-hop-docblock.md names '@objectstack/spec': patch and carries both declaration lines, and skip-changeset is off the PR (removed 2026-11-19T16:55:15Z; the labels now are documentation, size/s, tooling, needs:contract-review, protocol:data).
  • Check Changeset is now a judged green, not an exempt one. Its success run started at 16:55:22Z, after the label came off, and its log reads "This PR adds 1 changeset(s), so it declares a release of its own", "No empty-frontmatter changeset introduced by this diff (1 declaring changeset(s) added)" and "LEVEL AXIS: this PR declares clause-② no and metadata-protocol none, and it introduces no changeset entry graded minor or above and moves no metadata-protocol baseline".
  • Level: right. Clause-②: no and Metadata-protocol: none still describe the diff, the kind none takes patch, and patch is what the entry grades.
  • The entry, sentence by sentence: true.
    • "comments only, in src/data/filter.zod.ts, which the package ships as source": the diff is comment lines, and files[] lists src/**/*.zod.ts.
    • "said the engine serves it one level deep; they now say up to three relationships deep (ADR-0071's 3-hop limit, RELATION_CONDITION_MAX_HOPS in objectql), with a condition past the third relationship refused as INVALID_FILTER / 400": as read against the engine in the earlier record.
    • "and name the platform-provisioned id, created_at and updated_at beside the related object's declared fields as admitted keys": ① above.
    • The refusal and the key list are stated in the form 4 docblock; the three one-line comments carry the number and point to it. Read as a summary of the set, the sentence holds.
  • The entry carries no tracker number, and the delta edits no CHANGELOG.md and nothing under content/docs/releases/.

③ Boundary flags

  • The delta raises no new flag. Its commit message carries none.
  • SQL push-down: not applicable. No code line changes.
  • Security. No changed line teaches permission, sharing, credential, token or authentication behaviour.
  • Carried from the earlier record, still the seat's to file, not re-judged here:
    • The card for the form 4 docblock's "the same on every driver" (line 2217, untouched by the delta as well) and for its cap sentence. The delta re-wrapped the cap sentence again (lines 2228 to 2230) without rewording it: its text equals main's once whitespace is normalised.
    • The .claude/** card for os-dev.md line 301 and l1-review-checklist.md line 26, which give opposite answers for a comment in a spec *.zod.ts file.

④ Design judgment

packages/spec/src/data/filter.zod.ts: the delta holds against the code it describes.

  • N1: closed. The form 4 sentence now reads "every key must be a field the related object declares (or id, created_at, updated_at)", which is the admission's accept set (①).
  • The rest of that sentence is word for word what the earlier record judged; only its line breaks moved. The three one-line comments are untouched by the delta.
  • Tried to break the new clause, and could not:
    • The provisioned map holds exactly those three names, so the list neither omits one nor names one the engine refuses.
    • The provisioned branch continues before any refusal and before the relation test, and the three columns are stored as text and datetime, so naming them opens no extra relationship past the hop limit.

No must-fix, no should-fix.

Implemented-by: claude/issue-35494-nested-relation-hop-docblock
Reviewed-by: session_01L9qibvVRcFWKrfWeG5jzPb

VERDICT: PASS

@objectstack-fleet objectstack-fleet Bot removed the needs:contract-review Marker only — PR awaits its at-tier Contract review PASS; no check reads it, the record decides label Nov 20, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-tesla · session_01L9qibvVRcFWKrfWeG5jzPb

Landing (2026-11-20T04:39Z), area d7-C under the standing go-ahead for pm-dispatch-reviewed PRs.

  • L1: ACCEPT 7015523355 at 3253eff9, delta ACCEPT 7030049171 at ce513cad.
  • L2 (CONTRACT_REVIEW_TIER, published-schema face): FAIL 7015837933 at 3253eff9 (M1 closed), delta PASS 7030111629 at ce513cad, no open must-fix or should-fix.
  • Head 38da08ce64242ab60ce9b7159451f45cb027f16c is ce513cad plus a clean merge of origin/main (a3a74f27) for K: the PR diff's patch-id is d7f7705d0b38057ee99f207d3cd63074a8764708 at both heads, so the ACCEPT and the PASS carry.
  • Checks at 38da08ce: 58 success, 11 skipped, 0 failed or pending; mergeable clean; check-governed-merges --pr 35574: NOT governed, 28 lines; landing-k: K = 3.
    Marking ready and arming auto-merge.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 20, 2026 04:39
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit f7b172f Nov 20, 2026
70 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-35494-nested-relation-hop-docblock branch November 20, 2026 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation protocol:data size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spec docblock: FilterCondition form 4 (nested relation) says "one level" but the engine serves up to three hops

2 participants